{% extends 'base.html' %}

{% block nav %}
<li class="active">
    <i class="fa fa-user"></i> 主机列表
</li>
{% endblock %}

{% block content %}
<div class="row">
    <div class="col-xs-12 col-md-12">
        <div class="widget">
            <div class="widget-header  with-footer">
                <div class="widget-buttons">
                    <a href="#" data-toggle="maximize">
                        <i class="fa fa-expand"></i>
                    </a>
                    <a href="#" data-toggle="collapse">
                        <i class="fa fa-minus"></i>
                    </a>
                    <a href="#" data-toggle="dispose">
                        <i class="fa fa-times"></i>
                    </a>
                </div>
            </div>
            <div class="widget-body">
                <div class="alert alert-info fade in alert-radius-bordered alert-shadowed">
                </div>
                <div class="flip-scroll">
                <legend>分类查询</legend>
                <form  action="/cmdb/select/host"  method="POST">
                                                    <div class="form-group">
                                                        <label for="xsinput">资产编号</label>
                                                        <input type="text" class="form-control input-xs" id="keys" placeholder="assets_number">
                                                    </div>
                                                    <div class="form-group">
                                                        <label for="xsinput">IDC类型</label>
                                                        <input type="text" class="form-control input-xs" id="xsinput" placeholder="IDC_type">
                                                    </div>
                                                    <div class="form-group">
                                                        <label for="xsinput">机房</label>
                                                        <input type="text" class="form-control input-xs" id="xsinput" placeholder="room_info">
                                                    </div>
                                                    <div class="form-group">
                                                        <label for="xsinput">系列号</label>
                                                        <input type="text" class="form-control input-xs" id="xsinput" placeholder="serial_number">
                                                    </div>
                                                    <div class="form-group">
                                                        <label for="xsinput">外网IP</label>
                                                        <input type="text" class="form-control input-xs" id="xsinput" placeholder="wan_ip">
                                                    </div>
                                                    <div class="form-group">
                                                        <label for="xsinput">内网IP</label>
                                                        <input type="text" class="form-control input-xs" id="xsinput" placeholder="ip">
                                                    </div>
                                                    <div class="form-group">
                                                        <label for="xsinput">使用方</label>
                                                        <input type="text" class="form-control input-xs" id="xsinput" placeholder="assets_user">
                                                    </div>
                                                    <div class="form-group">
                                                        <label for="xsinput">业务名称</label>
                                                        <input type="text" class="form-control input-xs" id="xsinput" placeholder="business_name">
                                                    </div>

                                                       <input class="btn btn-primary shiny" formenctype="multipart/form-data" value='提交' />

                                                </form>
                    <table class="table table-bordered table-striped table-condensed flip-content">
                        <thead class="flip-content bordered-palegreen">
                            <tr>
                            <th class="numeric">固定资产编号</th>
                            <th class="numeric">IDC类型</th>
                            <th class="numeric">机房信息</th>
                            <th class="numeric">机柜信息</th>
                            <th class="numeric">系列号</th>
                            <th class="numeric">型号</th>
                            <th class="numeric">外网IP</th>
                            <th class="numeric">内网IP</th>
                            <th class="numeric">远程管理卡IP</th>
                            <th class="numeric">状态</th>
                            <th class="numeric">使用方</th>
                            <th class="numeric">业务类型</th>
                            <th class="numeric">业务名称</th>
                            <th class="numeric">详细作用</th>
                            <th class="numeric">上线时间</th>
                            <th class="numeric">下线时间</th>
                            <th class="numeric">系統</th>
                            <th class="numeric">来源</th>
                            <th class="numeric">租售期限</th>
                            <th class="numeric">合同单号</th>
                            <th class="numeric">单价</th>
                            <th class="numeric">月度费用</th>
                            <th class="numeric">上架时间</th>
                            <th class="numeric">下架时间</th>
                            <th class="numeric">使用天数</th>
                            <th class="numeric">本月计费</th>
                            <th class="numeric">备注信息</th>
                            <th class="numeric">CPU</th>
                            <th class="numeric">内存</th>
                            <th class="numeric">硬盘</th>
                            </tr>
                        </thead>
                        <tbody>
                            {% if result %}
                            {% if result['data'] %}
                            {% for id,assets_number,IDC_type,room_info,cabinet_info,serial_number,model_number,wan_ip,ip,remote_ip,status,assets_user,business_type,business_name,detailed_action,upline_time,downline_time,osystem,source,deadline,contract_number,price,monthly_fee,up_time,down_time,usage_days,monthbilling,comment,cpu, mem, disk in result['data'] %}
                             <tr>
                            <form  action="/cmdb/edit/host"  method="POST">
                                <input type="hidden" name="id" value="{{ id }}" />
                                <td class="info">{{ assets_number }}</td>
                                <td class="warning">{{ IDC_type }}</td>
                                <td class="active">{{ room_info }}</td>
                                <td >{{ cabinet_info }}</td>
                                <td class="success">{{ serial_number }}</td>
                                <td >{{ model_number }}</td>
                                <td class="danger">{{ wan_ip }}</td>
                                <td class="numeric">{{ ip }}</td>
                                <td >{{ remote_ip }}</td>
                                <td >{{ status }}</td>
                                <td >{{ assets_user }}</td>
                                <td >{{ business_type }}</td>
                                <td >{{ business_name }}</td>
                                <td >{{ detailed_action }}</td>
                                <td >{{ upline_time }}</td>
                                <td >{{ downline_time }}</td>
                                <td >{{ osystem }}</td>
                                <td >{{ source }}</td>
                                <td >{{ deadline }}</td>
                                <td >{{ contract_number }}</td>
                                <td >{{ price }}</td>
                                <td >{{ monthly_fee }}</td>
                                <td >{{ up_time }}</td>
                                <td >{{ down_time }}</td>
                                <td >{{ usage_days }}</td>
                                <td >{{ monthbilling }}</td>
                                <td >{{ comment }}</td>
                                <td >{{ cpu }}</td>
                                <td >{{ mem }}</td>
                                <td >{{ disk }}</td>


                             </form>

                             </tr>
                            {% endfor %}
                        {% endif %}
                      {% endif %}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}

